package fr.mairie.parc.dao.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.ResultSetExtractor;

import fr.mairie.parc.domain.Installation;

public class InstallationResultSetExtractor implements ResultSetExtractor{

	@Override
	public Object extractData(ResultSet rs) throws SQLException,
			DataAccessException {
			Installation installation = new Installation();
			installation.setIdInstallation(rs.getInt(1));
			installation.setIdAttribution(rs.getInt(2));
			installation.setFicheInstallation(rs.getBytes(3));
			installation.setEtat(rs.getString(4));
			installation.setDate(rs.getString(5));
		
		return installation;
	}

}
